<script type="text/javascript" src="/js/system/user/user.js"></script>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="m-b-md">
			<form class="form-inline" role="form" id="searchForm" name="searchForm">
				<div class="form-group">
					<label class="control-label">
						<span class="h4 font-thin v-middle">账号:</span>
					</label>
					<input class="form-control" id="username" name="username">
				</div>
				<a href="javascript:void(0)" @click="reload" class="btn btn-s-md btn-default btn-rounded" id="search">查询</a>
			</form>
		</div>
		<header class="panel-heading">
			<div class="doc-buttons">
				<button type="button" @click="download" class="btn btn-sm btn-default" title="下载">
					<i class="fa fa-download "></i>
					导出
				</button>
				<button type="button" @click="del" class="btn btn-danger marR10">删除</button>
				<button type="button" @click="toupdate" class="btn btn-info marR10">编辑</button>
			</div>
		</header>
		<div class="table-responsive">
			<div id="paging" class="pagclass"></div>
		</div>
	</div>
	<div class="panel panel-default" v-show="!showList">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="panel-body">
				<input type="hidden" v-model="user.id">
				<div class="form-group">
					<label class="col-sm-3 control-label">用户名</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" disabled="disabled" required lay-verify="required" placeholder="请输入用户名" v-model="user.username">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">手机号码</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" required lay-verify="required" placeholder="请输入手机号码" v-model="user.phone">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">电子邮箱</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" required lay-verify="required" placeholder="请输入电子邮箱" v-model="user.email">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">所属角色</label>
					<div class="col-sm-9">
						<select class="form-control" v-model="user.roleid" required lay-verify="required">
							<option v-bind:value="roleoption.id" v-for="roleoption in roleoptions">{{ roleoption.name }}</option>
						</select>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">是否禁用</label>
					<div class="col-sm-9">
						<select class="form-control" v-model="user.state" required lay-verify="required">
							<option value="lock">是</option>
							<option value="OK">否</option>
							<option value="die">未激活</option>
						</select>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
			</div>
			<footer class="panel-footer text-right bg-light lter">
				<div class="form-group">
					<div class="col-sm-2 control-label"></div>
					<input type="button" class="btn btn-primary" @click="update" value="确定" />
					&nbsp;&nbsp;
					<input type="button" class="btn btn-warning" @click="reload" value="返回" />
				</div>
			</footer>
		</form>
	</div>
</div>
